<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>自定义下划线</title>
    <link rel="stylesheet" href="../public.css">
    <style>
        .box {
            /* width: 80%; */
            padding: 20px;
            margin: 20px auto;
            border: 1px solid black;
        }

        a[href] {
            text-decoration: none;

        }

        .back a[href] {
            display: inline-block;
            line-height: .9;
            border-bottom: 1px solid gray;
        }

        .back1 a {
            font-size: 16px;
            background: linear-gradient(gray, gray) no-repeat;
            background-size: 100% 1px;
            background-position: 0 1.15em;
            text-shadow: .05em 0 white, -.05em 0 white;
        }
    </style>
</head>

<body>
    <div class="content">
        <h1>通过边框模拟下划线</h1>
        <ul>
            <li>文本下划线，常用边框模拟下划线</li>
            <li>用边框模拟的下划线，跟文本之间的间隙很大,可以通过display:inline-block;line-height:.9;调整下划线和文本之间的间隙</li>
            <li>但是上面方法会阻止正常的文本换行行为</li>
        </ul>
        <div class="box  back">
            The beta version of the digital <a href="#">yuan wallet app went live on Apple's App Store and Android app
                stores on</a>
            Tuesday, <a href="#">ready for the broad use </a>by domestic and<a href="#">international customers during
            </a> the upcoming Beijing Winter
            Olympics

        </div>
    </div>
    <div class="content">
        <h1>通过背景模拟下划线</h1>
        <ul>

        </ul>
        <div class="box  back1">
            The beta version of the digital <a href="#">yuan wallet app went live on Apple's App Store and Android app
                stores on</a>
            Tuesday, <a href="#">ready for the broad use </a>by domestic and<a href="#">international customers during
            </a> the upcoming Beijing Winter
            Olympics

        </div>
    </div>
</body>

</html>